import json
import os

FookieFile = 'D://biyeproject//JobProject//Common//Fookie.json'
def getAllFookieFile():
    # print(os.getcwd())
    with open(FookieFile) as f:
        Fookie = json.load(f)
    return Fookie
def getFookieFile(key):

    Fookie = getAllFookieFile()
    print(Fookie)
    return Fookie[key]
def setFookieFile(key, value, key2 = None , key3 = None ):
    print("我被启动了啊大法师")
    Fookie = getAllFookieFile()
    Fookie[key] = value
    # test_dict = json.dumps(Fookie)
    with open(FookieFile, "w") as f:
        f.truncate()
        json.dump(Fookie, f)
    return Fookie[key]
def delFookie(key):
    Fookie = getAllFookieFile()
    del Fookie[key]
    with open(FookieFile, "w") as f:
        f.truncate()
        json.dump(Fookie, f)
    return Fookie

# print(getAllFookieFile())
# str = ["1","2","1","2"]
# print(setFookieFile('indexOption',str))
# print(getAllFookieFile())
# delFookie('indexOption')
# print(getAllFookieFile())